package net.hasor.dbvisitor.adapter.redis.parser;
import org.antlr.v4.runtime.BaseErrorListener;
import org.antlr.v4.runtime.RecognitionException;
import org.antlr.v4.runtime.Recognizer;

public class ThrowingListener extends BaseErrorListener {

    public static final ThrowingListener INSTANCE = new ThrowingListener();

    @Override
    public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) {
        throw new QueryParseException(line, charPositionInLine, msg);
    }
}
